{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=3152
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i,k,kk,ls:int64;
	s:string;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
i:=0;
readln(s);
ls:=length(s);
while ls>0 do begin
	inc(i);
	kk:=pos(' ',s);
	if kk=0 then begin
		k:=strtoint(S);
		s:='';
	end else begin
		k:=strtoint(copy(s,1,kk-1));
    delete(S,1,kk);
	end;
	if odd(i) then begin
		if i<>1 then write(' ');
		write(k);
	end;
	ls:=length(s);
end;
writeln;
end.